import Cookies from 'js-cookie'
const _ticketName = '__acb_config_ticket'

/**
 * 获取ticket
 */
export function getTicket() {
  return Cookies.get(_ticketName)
}

/**
 * 设置ticket
 * @param {string} ticket 登录令牌
 */
export function setTicket(ticket) {
  Cookies.set(_ticketName, ticket, {
    expires: 7
  })
}

export default {
  getTicket,
  setTicket
}
